package team.lourd.network.system.own.domain.netel;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import team.lourd.network.system.own.domain.Model;
import team.lourd.network.system.own.domain.Record;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.List;

/**
 * @Description: 网元的基本信息
 * @Author: Lourd
 * @Date: 2019/1/21
 */
@Table(name = "ne_model")
@Entity
@Getter
@Setter
@NoArgsConstructor
public class NEModel extends Model {

    private String type;

    @OneToMany(
            mappedBy = "neModel",
            cascade = CascadeType.ALL)
    private List<NEBranch> neBranches;

    @OneToMany(mappedBy = "neModel", cascade = CascadeType.ALL)
    private List<Record> records;

}
